<input type="hidden" name="promotion_id" value="<?php echo $promotion_id ?>"/>
<li>
  <label for="type"><?php echo $this->lang->line('label.promotion_media.type') ?><span>*</span></label>
  <div class="input">
    <select id="type" name="type" class="chzn chzn-done" style="visibility: visible;">
      <option value="0">
        <?php echo $this->lang->line('label.option.select') ?>
      </option>
      <?php
      $types = array('image' => $this->lang->line('label.image'),
          'video' => $this->lang->line('label.video'),
          'audio' => $this->lang->line('label.audio'),
          'flash' => $this->lang->line('label.flash'));
      foreach ($types as $value => $label) {
        ?>
        <option value="<?php echo $value ?>"
                <?php echo empty($obj["type"]) || $obj["type"] != $value ? "" : 'selected="selected"' ?>>
                  <?php echo $label ?>
        </option>
      <?php } ?>
    </select>
  </div>
</li>
<li>
  <label for="path"><?php echo $this->lang->line('label.promotion_media.path') ?></label>
  <div class="input">
    <input type="file" id="path" name="path">
  </div>
</li>
<?php if(!empty($obj['path']) && !empty($obj['promotion_id']) ) { ?>
<li>
  <label for="image">&nbsp;</label>
  <div class="input">
    <img width="200px" alt="media"
         src="<?php echo site_url('admin/file_upload/get_img_from_path?path=promotion/'.$obj['promotion_id'].'/'.$obj['path'])?>" />
  </div>
</li>
<?php } ?>
<li>
  <label for="original_name"><?php echo $this->lang->line('label.promotion_media.original_name') ?></label>
  <div class="input">
    <input type="text" id="path" value="<?php echo empty($obj["original_name"]) ? "" : $obj["original_name"] ?>" name="original_name">
  </div>
</li>
<li>
  <label for="is_main"><?php echo $this->lang->line('label.promotion_media.is_main') ?></label>
  <div class="input">
    <input type="checkbox" id="is_main" value="1" name="is_main" 
           <?php echo isset($obj["is_main"]) && $obj["is_main"] ? 'checked="checked"' : "" ?>>
  </div>
</li>
